package com.thf.config;

import com.thf.util.ResultJson;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;


@RestControllerAdvice
public class MyDefaultException {

    @ExceptionHandler
    public ResultJson defaultExceptionHandler(Exception ex){
        System.out.println("出现异常===============>"+ex.getMessage());
        return ResultJson.error(ex.getMessage());
    }
}
